package com.miya.entity.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.miya.entity.BaseEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * @author Caixiaowei
 * @ClassName Menu.java
 * @Description 资源
 * @createTime 2020年05月13日 11:19:00
 */
@Data
@TableName("t_menu")
public class Menu extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 7187628714679791771L;

    // 菜单
    public static final String TYPE_MENU = "0";
    // 按钮
    public static final String TYPE_BUTTON = "1";
    public static final Long TOP_MENU_ID = 0L;

    /**
     * 上级菜单ID
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 菜单/按钮名称
     */
    @TableField("menu_name")
    private String menuName;

    /**
     * 菜单URL
     */
    @TableField("path")
    private String path;

    /**
     * 对应 Vue组件
     */
    @TableField("component")
    private String component;

    /**
     * 权限标识
     */
    @TableField("perms")
    private String perms;

    /**
     * 图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 类型 0菜单 1按钮
     */
    @TableField("type")
    private String type;

    /**
     * 排序
     */
    @TableField("order_num")
    private Integer orderNum;

    private transient String createTimeFrom;
    private transient String createTimeTo;

}
